package com.aichongbang.acb.po;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author acb
 * @since 2021-05-27
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_user")
public class User extends Model implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "t_id", type = IdType.AUTO)
    private Integer tId;

    private String tUsername;

    private String tPassword;

    private String tName;

    private String tTel;

    private String tEmail;

    private Integer fkStore;

    @TableLogic
    private Integer tDeleted;

    @TableField(exist = false)
    private List<UserRole> userRoleList;
    @TableField(exist = false)
    private List<RolePermission> rolePermissionList;

    public User() {
    }

    public User(String tUsername, String tPassword, String tName, String tTel, String tEmail) {
        this.tUsername = tUsername;
        this.tPassword = tPassword;
        this.tName = tName;
        this.tTel = tTel;
        this.tEmail = tEmail;
    }
}
